package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.JdkyOrderMapper;
import com.aidex.biz.domain.JdkyOrder;
import com.aidex.biz.service.JdkyOrderService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 京东订单推送Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-10-10
 */
@Service
@Transactional(readOnly = true)
public class JdkyOrderServiceImpl extends BaseServiceImpl<JdkyOrderMapper, JdkyOrder> implements JdkyOrderService
{
    private static final Logger log = LoggerFactory.getLogger(JdkyOrderServiceImpl.class);

    /**
     * 获取单条数据
     * @param jdkyOrder 京东订单推送
     * @return 京东订单推送
     */
    @Override
    public JdkyOrder get(JdkyOrder jdkyOrder)
    {
        JdkyOrder dto = super.get(jdkyOrder);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 京东订单推送id
     * @return 京东订单推送
     */
    @Override
    public JdkyOrder get(String id)
    {
        JdkyOrder dto = super.get(id);
        return dto;
    }


    /**
     * 查询京东订单推送列表
     * @param jdkyOrder 京东订单推送
     * @return 京东订单推送
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<JdkyOrder> findList(JdkyOrder jdkyOrder)
    {
        return super.findList(jdkyOrder);
    }

    /**
     * 分页查询京东订单推送列表
     * @param jdkyOrder 京东订单推送
     * @return 京东订单推送
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<JdkyOrder> findPage(JdkyOrder jdkyOrder)
    {
        return super.findPage(jdkyOrder);
    }

    /**
     * 保存京东订单推送
     * @param jdkyOrder
     * @return 结果
     */
    @Override
    public boolean save(JdkyOrder jdkyOrder)
    {
        return super.save(jdkyOrder);
    }


    /**
     * 删除京东订单推送信息
     * @param jdkyOrder
     * @return 结果
     */
    @Override
    public boolean remove(JdkyOrder jdkyOrder)
    {
        return super.remove(jdkyOrder);
    }

    /**
     * 批量删除京东订单推送
     * @param ids 需要删除的京东订单推送ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteJdkyOrderByIds(String[] ids)
    {
        return mapper.deleteJdkyOrderByIds(ids);
    }

    /**
     * 获取最大编号
     * @param jdkyOrder 京东订单推送
     * @return 结果
     */
    @Override
    public int findMaxSort(JdkyOrder jdkyOrder)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(jdkyOrder));
    }
}
